package com.hunan.yllxy.repostitory.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hunan.yllxy.util.Preconditions;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author 刘华
 * @since 2025-06-20
 */
@Getter
@Setter
@TableName("daka_content_info")
@ApiModel(value = "DakaContentInfo对象", description = "")
public class DakaContentInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty("打卡描述")
    @TableField("daka_des")
    private String dakaDes;

    @ApiModelProperty("是否自由打卡")
    @TableField("is_freedom")
    private Boolean isFreedom;

    @ApiModelProperty("排序")
    @TableField("content_index")
    private Integer contentIndex;

    private String titleName;

    private String activityId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date deadline;

    private Boolean isSocialNum;

    @TableField(exist = false)
    private List<DakaOptionInfo> dakaOptionInfos;
    @TableField(exist = false)
    private Boolean sfdk;

    @TableField(exist = false)
    private List<UserDakaInfo> userDakaInfoList;

    public void check() {
        Preconditions.checkNullArgument(dakaDes,"打卡描述");
        Preconditions.checkNullArgument(isFreedom,"是否自由打卡");
        Preconditions.checkNullArgument(contentIndex,"打卡排序");
        Preconditions.checkNullArgument(titleName,"标题");
        Preconditions.checkNullArgument(deadline,"打卡截止日期");
        Preconditions.checkNullArgument(isSocialNum,"打卡截止日期");
    }
}
